<template>
  <el-card shadow="never" class="aui-card--fill">
    <div class="mod-sys__dept">
      <el-table
        v-loading="dataListLoading"
        :data="dataList"
        border
        @selection-change="dataListSelectionChangeHandle"
        @sort-change="dataListSortChangeHandle"
        style="width: 100%"
      >
        <el-table-column
          type="selection"
          header-align="center"
          align="center"
          width="50"
        ></el-table-column>
        <el-table-column
          prop="targetName"
          label="评价对象姓名"
          align="center"
          :show-overflow-tooltip="true"
          min-width="120"
        ></el-table-column>
         <el-table-column
          prop="userName"
          label="用户姓名"
          align="center"
          :show-overflow-tooltip="true"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="rate"
          label="评级"
          align="center"
          :show-overflow-tooltip="true"
          min-width="120"
        >
        <template slot-scope="scope">
         {{scope.row.rate}}级
        </template>
        </el-table-column>
        <el-table-column
          prop="content"
          label="评论内容"
          header-align="center"
          align="center"
          :show-overflow-tooltip="true"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="createDate"
          label="创建时间"
          header-align="center"
          align="center"
         width="160"
        ></el-table-column>
        <el-table-column
          :label="$t('handle')"
          fixed="right"
          header-align="center"
          align="center"
          width="150"
        >
          <template slot-scope="scope">
            <el-button
              type="text"
              size="small"
              @click="addOrUpdateHandle(scope.row.id)"
              >编辑</el-button
            >
            <el-button
              type="text"
              size="small"
              @click="deleteHandle(scope.row.id)"
              >{{ $t("delete") }}</el-button
            >
          </template>
        </el-table-column>
      </el-table>
        <el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total" layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle" @current-change="pageCurrentChangeHandle">
        </el-pagination>
    </div>
  </el-card>
</template>

<script>
import mixinViewModule from "@/mixins/view-module";
export default {
  mixins: [mixinViewModule],
  data() {
    return {
      mixinViewModuleOptions: {
        getDataListURL: "/scenic/commrate/page",
        deleteURL: "/scenic/commrate",
        getDataListIsPage: true,
        deleteIsBatch: true,
        exportURL: "/scenic/commrate/export",
      },
      dataForm: {},
    };
  },
  components: {
  },
};
</script>
